// -----------------------------------------------------------
//
// Root.cs
//
// During Global Game Jam Metz - 28/01/2012
//
// -----------------------------------------------------------

using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Audio;


namespace GlobalGameJam
{
#if WINDOWS || XBOX
    public class Root : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        ScreenManager screenManager;

        static readonly string[] preloadAssets =
        {
            
        };
        public int Width
        {
            get { return Width; }
        }
        public int width;

        public int Height
        {
            get { return height; }
        }
        public int height;

        public Root()
        {
            Content.RootDirectory = "Content";

            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = 1200;
            width = graphics.PreferredBackBufferWidth;
            graphics.PreferredBackBufferHeight = 800;
            height = graphics.PreferredBackBufferHeight;
            graphics.IsFullScreen = true;
            screenManager = new ScreenManager(this);

            Components.Add(screenManager);
//            screenManager.AddScreen(new BackgroundScreen(), null);
            screenManager.AddScreen(new StartMenuScreen(), null);
        }

        protected override void LoadContent()
        {
            foreach (string asset in preloadAssets)
            {
                Content.Load<object>(asset);
            }
            //_song = Content.Load<Song>("04 Sierra Leone");
            //MediaPlayer.Play(_song);
        }

        protected override void Draw(GameTime gameTime)
        {
            graphics.GraphicsDevice.Clear(Color.Black);
            base.Draw(gameTime);
        }

        static void Main()
        {
            using (Root game = new Root())
            {
                game.Run();
            }
        }
    }
#endif
}

